package cn.stylefeng.guns.modular.order.mapper;

import cn.stylefeng.guns.modular.basic.model.params.BasicCostStandardConfParam;
import cn.stylefeng.guns.modular.order.entity.OrderWeightCheck;
import cn.stylefeng.guns.modular.order.model.params.OrderWeightCheckParam;
import cn.stylefeng.guns.modular.order.model.result.OrderWeightCheckResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单重量复核 Mapper 接口
 * </p>
 *
 * @author zhangzh
 * @since 2024-05-20
 */
public interface OrderWeightCheckMapper extends BaseMapper<OrderWeightCheck> {

    /**
     * 获取列表
     *
     * @author zhangzh
     * @Date 2024-05-20
     */
    List<OrderWeightCheckResult> customList(@Param("paramCondition") OrderWeightCheckParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhangzh
     * @Date 2024-05-20
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") OrderWeightCheckParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhangzh
     * @Date 2024-05-20
     */
    Page<OrderWeightCheckResult> customPageList(@Param("page") Page page, @Param("paramCondition") OrderWeightCheckParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author zhangzh
     * @Date 2024-05-20
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") OrderWeightCheckParam paramCondition);

    OrderWeightCheckResult findByOrderNo(@Param("orderNo") String orderNo);
    /**
     * 批量添加
     * @param list
     * @return
     */
    boolean saveBatchList(@Param("list")List<OrderWeightCheckParam> list);

    /**
     * 根据订单号删除
     * @param orderNo
     * @return
     */
    boolean delByOrderNo(@Param("orderNo") String orderNo);

    /**
     * 修改复核重量
     * @param orderWeightCheckParam
     * @return
     */
    int updateCheckWeightByOrderNo(OrderWeightCheckParam orderWeightCheckParam);


}
